package com.ucpaas.paas.web.controller._template;


import com.ucpaas.paas.domain.dto.Page;
import com.ucpaas.paas.domain.vo.ResultVO;
import com.ucpaas.paas.web.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/_template")
public class _templateContoller extends BaseController {
    @RequestMapping(path = "/list", method = RequestMethod.GET)
    public ModelAndView pageList(ModelAndView mv) {
        mv.setViewName("_template/list");
        return mv;
    }

    @RequestMapping(path = "/add", method = RequestMethod.GET)
    public ModelAndView pageAdd(ModelAndView mv) {
        mv.setViewName("_template/add");
        return mv;
    }

    @RequestMapping(path = "/edit", method = RequestMethod.GET)
    public ModelAndView pageEdit(ModelAndView mv) {
        mv.setViewName("_template/edit");
        return mv;
    }

    @RequestMapping(path = "/list", method = RequestMethod.POST)
    @ResponseBody
    public ResultVO dataList(Page page) {
        return ResultVO.failureWithMsg("模板");
    }

    @RequestMapping(path = "/page_row", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView pageRow(ModelAndView mv) {
        mv.setViewName("_template/page_row");
        return mv;
    }

}
